package net.siufung.security.provider.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import net.siufung.core.model.AbstractDto;
import net.siufung.core.utils.ValidationUtil;
import net.siufung.core.utils.ValidationUtil.ValidResult;

import javax.validation.constraints.NotBlank;

/**
 * 登录Token方式参数
 * @author 陈建峰
 * @since 2021/11/17 11:18 上午
 */
@Slf4j
@AllArgsConstructor
public class AccessTokenLoginDto extends AbstractDto {

    /**
     * accessToken方式登录
     */
    @Getter
    @Setter
    @NotBlank(message = "accessToken不能为空！")
    private String accessToken;

    @Override
    public ValidResult validResult() {
        return ValidationUtil.validateBean(this);
    }
}
